package jmine.tec.di.wrapper;

import java.io.Serializable;

import jmine.tec.annotations.Unmodifiable;

/**
 * Implementacao abstrata de wrapper
 * 
 * @author MarceloT
 */
@Unmodifiable
public abstract class AbstractWrapper implements Wrapper, Serializable {

    private static final long serialVersionUID = -8991883851507346121L;

    /**
     * Chama {@link Wrapper#wrap(Object[], Object[], Class)} para o valor passado
     * 
     * @param propertyKey os nomes das propriedades
     * @param propertyValues os valores das propriedades
     * @param valueType o tipo de valor
     * @return Object
     */
    public Object wrap(Object propertyKey, Object propertyValues, Class<?> valueType) {
        return this.wrap(new Object[]{ propertyKey }, new Object[]{ propertyValues }, valueType);
    }

    /**
     * {@inheritDoc}
     */
    public boolean isManyWrapper() {
        return true;
    }

}
